<div class="fm-content">
  <!-- 最上面标题栏 -->
  <div class="title">
    <i nz-icon [type]="'desktop'"></i>
    &nbsp;&nbsp;数据导入日志
  </div>
  <!-- 内容 -->
  <div class="clwork">

    <!-- 查询框 -->
    <div class="top">
      <input nz-input placeholder="名称" class="fm-input first-input" [(ngModel)]="fs.queryObject['name:like']" />
      <input nz-input placeholder="状态" class="fm-input" [(ngModel)]="fs.queryObject['state:like']" />
      <nz-button-group>
        <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
        <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
      </nz-button-group>
      <div class="tool-right">
        <nz-button-group>
          <button nz-popconfirm nzTitle="确认删除选择项?" (nzOnConfirm)="fs.delEntitys()" nzPlacement="bottomRight"
            nz-button>删除</button>
        </nz-button-group>
      </div>
    </div>

    <div class="left top-left">
      <div style="margin-top:5px; margin-left: 21px;">
        <nz-tree [nzShowExpand]='false' (nzClick)="fs.loadDataEx($event.node.key)"
          [nzData]="sideDic.treeDatas">
        </nz-tree>
      </div>
    </div>

    <div class="right top-right">
      <div class="table">
        <nz-table nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
          <thead>
            <tr>
              <th nzWidth="80px" nzShowCheckbox [(nzChecked)]="fs.allChecked" [nzIndeterminate]="fs.indeterminate"
                (nzCheckedChange)="fs.checkAll($event)"></th>
              <th nzWidth="20%">名称</th>
              <th nzWidth="20%">时间</th>
              <th nzWidth="20%">状态</th>
              <th>说明</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.datas">
              <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
              </td>
              <td><span (click)="fs.editRow(data)" class="form-edit">{{data.name}}</span></td>
              <td>{{data.lastTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
              <td>{{data.state===true?'成功':'失败'}}</td>
              <td>{{data.info}}</td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>

    <!-- 详细信息 -->
    <nz-drawer [nzBodyStyle]="{ height: 'calc(100% - 55px)', overflow: 'auto', 'padding-bottom': '53px' }"
      [nzMaskClosable]="false" [nzWidth]="1100" [nzVisible]="fs.isEditVisible" nzTitle="详细信息"
      (nzOnClose)="fs.closeEdit()">
      <div class="bpm-tabs">
        <h2 class="bpm-tabs-title">详细信息</h2>
        <nz-table nzSize="middle" [nzFrontPagination]="false" [nzData]="[{}]">
          <thead>
            <tr>
              <th>检查名称</th>
              <th>环节名称</th>
              <th>检查类型</th>
              <th>规则</th>
              <th>状态</th>
              <th>说明</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.er.items">
              <td>{{data.name}}</td>
              <td>{{data.tachename}}</td>
              <td>{{data.typeName}}</td>
              <td>{{data.rule}}</td>
              <td>{{data.state}}</td>
              <td>{{data.result}}</td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </nz-drawer>
  </div>
</div>
